//
//  Assets.swift
//  Link
//
//  Created by melvyn on 2018/11/2.
//

import Foundation

struct Assets {
    struct Image {
        
        static func username() -> UIImage {
            return UIImage(
                named: "live_login_user_dark_ico_18x18_",
                in: mainBundle(),
                compatibleWith: nil)!
            .withRenderingMode(.alwaysTemplate)
        }
        static func password() -> UIImage {
            return UIImage(
                named: "live_login_lock_dark_ico_18x18_",
                in: mainBundle(),
                compatibleWith: nil)!
                .withRenderingMode(.alwaysTemplate)
        }
    }
    
    struct Nib {
        static func userLogin() -> (nibName: String, bundle: Bundle) {
            return (String(describing: LoginViewController.self), mainBundle())
        }
        
        static func registration() -> (nibName: String, bundle: Bundle) {
            return (String(describing: RegistrationViewController.self), mainBundle())
        }
    }
    
    static func mainBundle() -> Bundle {
        return Bundle.init(url: Bundle.init(for: LoginViewController.self)
            .url(forResource: "Link", withExtension: "bundle")!)!
    }
}
